#include "test.h"

namespace Test
{
/*
    The carriage return (\r) and line feed (\n) characters, also called newline characters,
    are treated as end-of-line (EOL) markers. The combination of a carriage return followed
    immediately by a line feed is treated as one EOL marker.
*/

    void testEndOfLine()
    {
        ScannerTest test(" \r\r\r\n\n \n \r \r\n");

        test.checkNext( stWhiteSpace, " " );
        test.checkNext( stEOL, "\r" );
        test.checkNext( stEOL, "\r" );
        test.checkNext( stEOL, "\r\n" );
        test.checkNext( stEOL, "\n" );
        test.checkNext( stWhiteSpace, " " );
        test.checkNext( stEOL, "\n" );
        test.checkNext( stWhiteSpace, " " );
        test.checkNext( stEOL, "\r" );
        test.checkNext( stWhiteSpace, " " );
        test.checkNext( stEOL, "\r\n" );
    }
}